from book.models import BookInfo, PeopleInfo
book = BookInfo.objects.get(id=1)
book = BookInfo.objects.get(pk=5)

books = BookInfo.objects.all()

count = PeopleInfo.objects.count()

from book.models import BookInfo, PeopleInfo

BookInfo.objects.filter(id__exact=1)
BookInfo.objects.filter(id=1)
BookInfo.objects.get(id=1)
BookInfo.objects.get(pk=1)

BookInfo.objects.filter(name__contains='湖')

BookInfo.objects.filter(name__endswith='部')

BookInfo.objects.filter(name__isnull=True)

BookInfo.objects.filter(id__in=[1, 3, 5])

BookInfo.objects.filter(id__gt=3)

BookInfo.objects.filter(pub_date__year=1980)

BookInfo.objects.filter(pub_date__gt='1990-1-1')